package leetcode_1401_1500;

import com.sun.media.jfxmedia.events.NewFrameEvent;

import java.util.HashMap;
import java.util.Map;

public class LeeCode_1497 {
    public static void main(String[] args) {

    }
    private static boolean canArrange(int[] arr, int k) {
        int n = arr.length;
        int[] dp = new int[k + 1];
        for (int num : arr) {
            dp[(num % k + k) % k]++;
        }
        for (int i = 1; i + i <= k; i++) {
            if (dp[i] != dp[k -i]){
                return false;
            }
        }
        return dp[0] % 2 == 0;
    }
}
